home *** CD-ROM | disk | FTP | other *** search
/ Workbench Add-On / Workbench Add-On - Volume 1.iso / Text / Edit / Vim / doc / msdos.doc < prev    next >
Text File  |  1994-08-07  |  7KB  |  159 lines

  1. This file contains the particularities for the MSDOS version of Vim.
  2.  
  3. Known problem: When using smartdrive with write-behind caching, it is
  4. possible that Vim will try to create a swap file on a read-only file system
  5. (e.g. write protected floppy). You will then be given the message
  6.     "A serious disk error has occurred .., Retry (r)? "
  7. There is nothing you can do but unprotecting the floppy or switch off the
  8. computer. Even CTRL-ALT-DEL will not get you out of this. This is really a
  9. problem of smartdrive, not Vim. Smartdrive works fine otherwise. If this
  10. bothers you don't use the write-behind caching.
  11.  
  12. The default output method for the screen is to use bios calls. This will work
  13. right away on most systems. You do not need ansi.sys. You can use ":mode" to
  14. set the current screen mode. See reference.doc, section 20.3.
  15.  
  16. You can set the color used in vim with five termcap options:
  17.  
  18.     ":set t_ti=^V^[\|xxm"        start of invert mode
  19.     ":set t_tb=^V^[\|xxm"        start of bold mode
  20.     ":set t_tp=^V^[\|xxm"        back to normal text
  21.  
  22.     ":set t_so=^V^[\|xxm"        start of standout mode
  23.     ":set t_se=^V^[\|xxm"        back to normal text
  24.  
  25. Which of the three modes is used for which action depends on the 'highlight'
  26. ('hl') option. See reference.doc.
  27.  
  28. ^V is CTRL-V
  29. ^[ is ESC
  30. xx must be replaced by a decimal code: The foreground color number and
  31.    background color number added together:
  32.  
  33. COLOR        FOREGROUND    BACKGROUND
  34. black            0            0
  35. blue            1           16
  36. green            2           32
  37. cyan            3           48
  38. red            4           64
  39. magenta            5           80
  40. brown            6           96
  41. lighgray        7          112
  42. darkgray        8
  43. lightblue        9
  44. lightgreen       10
  45. lighcyan       11
  46. lightred       12
  47. lighmagenta       13
  48. yellow           14
  49. white           15
  50. blink               128
  51.  
  52. When you use 0, the color is reset to the one used when you started Vim. This
  53. is the default for t_tp. The default for t_ti is black on grey, 0 + 112 = 112.
  54. The default for t_tb is white on cyan, 15 + 48 = 63. The default for t_so is
  55. white on blue, 15 + 16 = 31. These colors where choosen, because the also look
  56. good when using an inverted display. But you can change them as you like.
  57.  
  58. The termcap codes that are translated into bios calls are:
  59.     ESC |J        clear screen
  60.     ESC |K        clear to end of line
  61.     ESC |L        insert line
  62.     ESC |M        delete line
  63.     ESC |row;colH    position cursor
  64.     ESC |attrm    set character attribute
  65.  
  66. If you set these with the ":set" command, don't forget to put a backslash
  67. before the '|', otherwise it will be recognized as the end of the command.
  68.  
  69. If you want to use another output method (e.g. when using a terminal on a COM
  70. port), set the terminal name to "pcansi". You can change the termcap options
  71. when needed (see chapter 20 of reference.doc). Note that the normal IBM
  72. ansi.sys does not support all the codes of the builtin pcansi terminal. If
  73. you use ansi.sys you will need to delete the termcap entries t_il and t_dl
  74. with
  75.     ":set t_il= t_dl=".
  76. Otherwise the screen will not be updated correctly. It is better to use
  77. nansi.sys, nnansi.sys or the like instead of ansi.sys.
  78.  
  79. If you want to use Vim on a terminal connected to a COM: port, reset the
  80. 'bioskey' option. Otherwise the commands will be read from the PC keyboard.
  81. CTRL-C and CTRL-P may not work correctly with 'bioskey' reset.
  82.  
  83. If the "tx" (textmode) option is set (which is the default), Vim will accept a 
  84. single <LF> or a <CR><LF> pair for end-of-line. When writing a file Vim will 
  85. use <CR><LF>. Thus if you edit a file and write it, <LF> is replaced with 
  86. <CR><LF>. If the "tx" option is not set the single <LF> will be used for
  87. end-of-line. A <CR> will be shown as ^M. You can use Vim to replace <LF> by
  88. <CR><LF> by reading in any mode and writing in text mode. You can use Vim to
  89. replace <CR><LF> by <LF> by reading in text mode and writing in non-text
  90. mode. 'textmode' is set automatically when 'textauto' is on (which is the
  91. default), so you don't really have to worry about what you are doing.
  92.  
  93. If you want to edit a script file or a binary file you should reset the
  94. 'textmode' and 'textauto' options before loading the file. Script files
  95. contain single <LF> characters which would be replaced by <CR><LF>. You can
  96. do this by starting Vim with the "-b" (binary) option.
  97.  
  98. The default help filename is "$VIM\vim.hlp". If the environment variable $VIM 
  99. is not defined or the file is not found, the DOS search path is used to 
  100. search for the file "vim.hlp". If you do not want to put "vim.hlp" in your 
  101. search path, use the command ":set helpfile=pathname" to tell Vim where the 
  102. help file is.
  103.  
  104. The ":cd" command recognizes the drive specifier and changes the current
  105. drive. Use ":cd c:" to make drive C the active drive. Use ":cd d:\dos" to go
  106. to the directory "dos" in the root of drive D.
  107.  
  108. The files "_vimrc" and "_exrc" are used instead of ".vimrc" and ".exrc".
  109. The files "$VIM\_vimrc" and "$VIM\_exrc" are used instead of "s:.vimrc" and 
  110. "s:.exrc". To use the file "c:\_vimrc" use the command "set vim=c:".
  111.  
  112. Use CTRL-break instead of CTRL-C to interrupt searches. The CTRL-C is not
  113. detected until a key is read.
  114.  
  115. Use CTRL-arrow-left and CTRL-arrow-right instead of SHIFT-arrow-left and 
  116. SHIFT-arrow-right. The arrow-up and arrow-down cannot be used with SHIFT or 
  117. CTRL.
  118.  
  119. Temporary files (for filtering) are put in the current directory.
  120.  
  121. The default for the sh (shell) option is "command". If COMSPEC is defined it
  122. is used instead. External commands are started with "command /c
  123. <command_name>". Typing CTRL-Z starts a new command shell. Return to Vim with
  124. "exit".
  125.  
  126. MS-DOS allows for only one filename extention. Therefore, in the original 
  127. filename the '.' is replaced by a '_', the name is truncated to 8 characters 
  128. and the new extention ".vim" or ".bak" is appended. Two examples: "test.c" 
  129. becomes "test_c.bak", "ditiseen.tst" becomes "ditiseen.bak". The 'shortname' 
  130. option is not available.
  131.  
  132. The MS-DOS binary was compiled with Borland-C++ version 3.1, using
  133. makefile.bcc. Other compilers should also work. Use makefile.dos for Turbo-C
  134. 2.0. Use makefile.bcc for other Borland compilers, also Turbo-C++ 3.0 (with
  135. small changes). If you get all kinds of strange error messages when compiling,
  136. you have to add <CR> characters at the end of each line. This can be done with
  137. the addcr program: "make addcr". This will compile addcr.c to addcr.exe and
  138. execute the addcr.bat file. Sometimes this fails. Then execute the addcr.bat
  139. file from the DOS prompt.
  140.  
  141. The "spawno" library by Ralf Brown was used in order to free memory when Vim
  142. starts a shell or other external command. Only about 200 bytes are taken from
  143. conventional memory. When recompiling get the spawno library from Simtel,
  144. directory "msdos/c". It is called something like "spwno413.zip". Or remove the
  145. library from the makefile.
  146.  
  147. A swap file is used to store most of the text. You should be able to edit very
  148. large files. However, memory is used for undo and other things. If you delete
  149. a lot of text you can still run out of memory.
  150.  
  151. If Vim gives an "Out of memory" warning you should stop editing. Result of
  152. further editing actions is unpredictable. Setting 'undolevels' to 0 saves some
  153. memory. Running the maze macros on a big maze is guaranteed to run out of
  154. memory, because each change is remembered for undo. In this case set
  155. 'undolevels' to a negative number. This will switch off undo completely. In a
  156. future release extended memory will be used to avoid these problems.
  157.  
  158. The *.info files are for the Amiga. You don't need them with MSDOS.
  159.